%\usepackage{titlesec}
\usepackage[localise]{xepersian}
\settextfont[ExternalLocation=statics/ttf/]{Vazir}
\defpersianfont\secfont[Scale=1.0,
			ExternalLocation=statics/ttf/]{Sahel-Black}
\defpersianfont\subfont[Scale=1.2,
						ExternalLocation=statics/ttf/]{Sahel-Bold}
\defpersianfont\ssubfont[Scale=1.1,
				ExternalLocation=statics/ttf/]{Sahel-Bold}
				
\makeatletter
\if@titlepage
\bidi@patchcmd\maketitle\@title{%
	\secfont
	\@title
}{\typeout{Suceeded}}{\typeout{Failed}}
\else
\bidi@patchcmd\@maketitle\@title{%
	\secfont
	\@title
}{\typeout{Suceeded}}{\typeout{Failed}}
\fi
\makeatother				
				
				
				
\makeatletter
\bidi@patchcmd\section\normalfont\secfont


{\typeout{Suceeded}}
{\typeout{Failed}}
\makeatother
\makeatletter
\bidi@patchcmd\subsection\normalfont\subfont


{\typeout{Suceeded}}
{\typeout{Failed}}
\makeatother


\makeatletter
\bidi@patchcmd\subsubsection\normalfont\ssubfont
{\typeout{Suceeded}}
{\typeout{Failed}}
\makeatother


\setlatintextfont[
	ExternalLocation=statics/ttf/,
	BoldFont={LiberationSerif-Bold.ttf},
	BoldItalicFont={LiberationSerif-BoldItalic.ttf},
	ItalicFont={LiberationSans-Italic.ttf}
	]{LiberationSans-Regular.ttf}
%\titleformat*{\section}{\secfont\bfseries}
%\titleformat*{\subsection}{\subfont\bfseries}
%\titleformat*{\subsubsection}{\ssubfont\bfseries}
\eqcommand{فونت‌تیتر}{secfont‌}
\eqcommand{فونت‌زیرتیتر}{secfont‌}
\eqcommand{فونت‌ززیرتیتر}{secfont‌}

